package bean;

import java.io.Serializable;
import java.util.ArrayList;

/*博客类*/
public class Article implements Serializable {
    private int id;/*博客*/
    private String content;/*博客内容*/
    private int likingDegree;/*博客喜爱度*/
    private int views;/*博客浏览次数*/
    private String title;/*博客标题*/
    private String time;/*博客发布时间*/
    private int commentCount;/*博客评论数*/
    private int category;/*博客所属目录*/
    private String user;/*博客发布者*/
    private ArrayList<Label> label;/*博客标签（存取）*/
    private ArrayList<Comment> comments;/*博客评论（存取）*/
    private String type;/*博客类型*/
    private String subfield;/*博客分栏*/
    private int approve;/*博客审批*/
    private int like;/*点赞数*/
    public Article(int account, int likingDegree, int views, String title, int commentCount, int category, String user, String type, String subfield, int like) {
    }

    public Article(int id, String content, int likingDegree, int views, String title, String time, int commentCount, int category, String user, ArrayList<Label> label, ArrayList<Comment> comments, String type, String subfield, int approve, int like) {
        this.id = id;
        this.content = content;
        this.likingDegree = likingDegree;
        this.views = views;
        this.title = title;
        this.time = time;
        this.commentCount = commentCount;
        this.category = category;
        this.user = user;
        this.label = label;
        this.comments = comments;
        this.type = type;
        this.subfield = subfield;
        this.approve = approve;
        this.like = like;
    }
    //    发布博客时创建对象


    public Article(String content, int likingDegree, int views, String title, String time, int commentCount, int category, String user,ArrayList<Label> label, String type, String subfield, int approve, int like) {
        this.content = content;
        this.likingDegree = likingDegree;
        this.views = views;
        this.title = title;
        this.time = time;
        this.commentCount = commentCount;
        this.category = category;
        this.user = user;
        this.label=label;
        this.type = type;
        this.subfield = subfield;
        this.approve = approve;
        this.like = like;
    }

    public Article(int id, String content, String title,String time, int category, ArrayList<Label> label, String type, String subfield, int approve) {
        this.id = id;
        this.content = content;
        this.title = title;
        this.time = time;
        this.category = category;
        this.label = label;
        this.type = type;
        this.subfield = subfield;
        this.approve = approve;
    }

    public Article(int id, int likingDegree, int views, String title, String time, int commentCount, int category, String user, String type, String subfield, int like) {
        this.id = id;
        this.likingDegree = likingDegree;
        this.views = views;
        this.title = title;
        this.time = time;
        this.commentCount = commentCount;
        this.category = category;
        this.user = user;
        this.type = type;
        this.subfield = subfield;
        this.like = like;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getLikingDegree() {
        return likingDegree;
    }

    public void setLikingDegree(int likingDegree) {
        this.likingDegree = likingDegree;
    }

    public int getViews() {
        return views;
    }

    public void setViews(int views) {
        this.views = views;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public ArrayList<Label> getLabel() {
        return label;
    }

    public void setLabel(ArrayList<Label> label) {
        this.label = label;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSubfield() {
        return subfield;
    }

    public void setSubfield(String subfield) {
        this.subfield = subfield;
    }

    public int getApprove() {
        return approve;
    }

    public void setApprove(int approve) {
        this.approve = approve;
    }

    public int getLike() {
        return like;
    }

    public void setLike(int like) {
        this.like = like;
    }

    public ArrayList<Comment> getComments() {
        return comments;
    }

    public void setComments(ArrayList<Comment> comments) {
        this.comments = comments;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", likingDegree=" + likingDegree +
                ", views=" + views +
                ", title='" + title + '\'' +
                ", time='" + time + '\'' +
                ", commentCount=" + commentCount +
                ", category=" + category +
                ", user='" + user + '\'' +
                ", label=" + label +
                ", comments=" + comments +
                ", type='" + type + '\'' +
                ", subfield='" + subfield + '\'' +
                ", approve=" + approve +
                ", like=" + like +
                '}';
    }
}